home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_c
/
cuj0696.zip
/
DWYER.ZIP
/
LIB
/
GETCHR.C
< prev
next >
Wrap
C/C++ Source or Header
|
1995-12-12
|
627b
|
34 lines
/* ============ */
/* GetChr.c */
/* ============ */
#include <stdio.h>
#define FLUSH_LINE(u) \
{ \
int x; \
do \
{ \
x = getc(u); \
} \
while (x != EOF && x != '\n'); \
}
/* ==================================================== */
/* GetChr - prompts operator with s to get character c */
/* ==================================================== */
# if defined(__STDC__) || defined(__PROTO__)
void
GetChr(char *s, char *c)
# else
int
GetChr(s, c)
char *s;
char *c;
# endif
{
fprintf(stderr, "%s", s);
scanf("%c", c);
FLUSH_LINE(stdin);
}